
function updateChartEvent() {
   

    var chartEventTabs = Ext.create('Ext.tab.Panel', {
        //width: 400,
        //height: 400,
        listeners:{
            tabchange :function( tabPanel, newCard, oldCard, eOpts ) {

            }
        },
        items: [
            {
                title: '单击(click)',
                items: [
                    {
                        xtype:'container',
                        height:'100%',
                        listeners:{
                            render:function() {
                                window.clickSourceEditor = ace.edit("clickSourceEditor");
                                window.clickSourceEditor.setTheme("ace/theme/monokai")
                                window.clickSourceEditor.setFontSize(20)
                                window.clickSourceEditor.session.setMode("ace/mode/javascript");
                                window.clickSourceEditor.session.setValue(window.eventClickSource?window.eventClickSource:'')
                                window.clickSourceEditor.on("change", function(value){
                                    eventClickSource = window.clickSourceEditor.session.getValue()
                                });
                            }
                        },
                        html:'<div id="clickSourceEditor" style="width:900px;height:309px"></div>',
                    }
                ]
            },
            {
                title: '双击(dblclick)',
                items:[
                    {
                        xtype:'container',
                        height:'100%',
                        listeners:{
                            render:function() {
                                window.dblclickSourceEditor = ace.edit("dblclickSourceEditor");
                                window.dblclickSourceEditor.setTheme("ace/theme/monokai")
                                window.dblclickSourceEditor.setFontSize(20)
                                window.dblclickSourceEditor.session.setMode("ace/mode/javascript");
                                window.dblclickSourceEditor.session.setValue(window.eventDblclickSource?window.eventDblclickSource:'')
                                window.dblclickSourceEditor.on("change", function(value){
                                    eventDblclickSource = window.dblclickSourceEditor.session.getValue()
                                });
                            }
                        },
                        html:'<div id="dblclickSourceEditor" style="width:900px;height:309px"></div>',
                    }
                ]
            },
            {
                title: '鼠标按下(mousedown)',
                items:[
                    {
                        xtype:'container',
                        height:'100%',
                        listeners:{
                            render:function() {
                                window.mousedownSourceEditor = ace.edit("mousedownSourceEditor");
                                window.mousedownSourceEditor.setTheme("ace/theme/monokai")
                                window.mousedownSourceEditor.setFontSize(20)
                                window.mousedownSourceEditor.session.setMode("ace/mode/javascript");
                                window.mousedownSourceEditor.session.setValue(window.eventMousedownSource?window.eventMousedownSource:'')
                                window.mousedownSourceEditor.on("change", function(value){
                                    eventMousedownSource = window.mousedownSourceEditor.session.getValue()
                                });
                            }
                        },
                        html:'<div id="mousedownSourceEditor" style="width:900px;height:309px"></div>',
                    }
                ]
            },
            {
                title: '鼠标移动(mousemove)',
                items:[
                    {
                        xtype:'container',
                        height:'100%',
                        listeners:{
                            render:function() {
                                window.mousemoveSourceEditor = ace.edit("mousemoveSourceEditor");
                                window.mousemoveSourceEditor.setTheme("ace/theme/monokai")
                                window.mousemoveSourceEditor.setFontSize(20)
                                window.mousemoveSourceEditor.session.setMode("ace/mode/javascript");
                                window.mousemoveSourceEditor.session.setValue(window.eventMousemoveSource?window.eventMousemoveSource:'')
                                window.mousemoveSourceEditor.on("change", function(value){
                                    eventMousemoveSource = window.mousemoveSourceEditor.session.getValue()
                                });
                            }
                        },
                        html:'<div id="mousemoveSourceEditor" style="width:900px;height:309px"></div>',
                    }
                ]
            },
            {
                title: '鼠标弹起(mouseup)',
                items:[
                    {
                        xtype:'container',
                        height:'100%',
                        listeners:{
                            render:function() {
                                window.mouseupSourceEditor = ace.edit("mouseupSourceEditor");
                                window.mouseupSourceEditor.setTheme("ace/theme/monokai")
                                window.mouseupSourceEditor.setFontSize(20)
                                window.mouseupSourceEditor.session.setMode("ace/mode/javascript");
                                window.mouseupSourceEditor.session.setValue(window.eventMouseupSource?window.eventMouseupSource:'')
                                window.mouseupSourceEditor.on("change", function(value){
                                    eventMouseupSource = window.mouseupSourceEditor.session.getValue()
                                });
                            }
                        },
                        html:'<div id="mouseupSourceEditor" style="width:900px;height:309px"></div>',
                    }
                ]
            },
            {
                title: '鼠标经过(mouseover)',
                items:[
                    {
                        xtype:'container',
                        height:'100%',
                        listeners:{
                            render:function() {
                                window.mouseoverSourceEditor = ace.edit("mouseoverSourceEditor");
                                window.mouseoverSourceEditor.setTheme("ace/theme/monokai")
                                window.mouseoverSourceEditor.setFontSize(20)
                                window.mouseoverSourceEditor.session.setMode("ace/mode/javascript");
                                window.mouseoverSourceEditor.session.setValue(window.eventMouseoverSource?window.eventMouseoverSource:'')
                                window.mouseoverSourceEditor.on("change", function(value){
                                    eventMouseoverSource = window.mouseoverSourceEditor.session.getValue()
                                });
                            }
                        },
                        html:'<div id="mouseoverSourceEditor" style="width:900px;height:309px"></div>',
                    }
                ]
            },
            {
                title: '鼠标离开(mouseout)',
                items:[
                    {
                        xtype:'container',
                        height:'100%',
                        listeners:{
                            render:function() {
                                window.mouseoutSourceEditor = ace.edit("mouseoutSourceEditor");
                                window.mouseoutSourceEditor.setTheme("ace/theme/monokai")
                                window.mouseoutSourceEditor.setFontSize(20)
                                window.mouseoutSourceEditor.session.setMode("ace/mode/javascript");
                                window.mouseoutSourceEditor.session.setValue(window.eventMouseoutSource?window.eventMouseoutSource:'')
                                window.mouseoutSourceEditor.on("change", function(value){
                                    eventMouseoutSource = window.mouseoutSourceEditor.session.getValue()
                                });
                            }
                        },
                        html:'<div id="mouseoutSourceEditor" style="width:900px;height:309px"></div>',
                    }
                ]
            }
        ]
    });

    

    Ext.getCmp('attrPanel').setTitle('图表事件')
    Ext.getCmp('attrPanel').remove(0)
    Ext.getCmp('attrPanel').add(chartEventTabs)
    
    if(nowDataSetPanel!=null) {
        Ext.getCmp('dataSetPanel').add(nowDataSetPanel)
        Ext.getCmp('dataSetPanel').setHidden(false)
    }
   
}
